package io.geekidea.springbootplus.system.service;

import io.geekidea.springbootplus.system.entity.Co;
import io.geekidea.springbootplus.system.param.CoPageParam;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.system.vo.CoQueryVo;
import io.geekidea.springbootplus.framework.core.pagination.Paging;

import java.util.List;
import java.io.Serializable;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

/**
 *  服务类
 *
 * @author miko
 * @since 2020-10-24
 */
public interface CoService extends BaseService<Co> {

    /**
     * 保存
     *
     * @param co
     * @return
     * @throws Exception
     */
    boolean saveCo(Co co) throws Exception;

    /**
     * 修改
     *
     * @param co
     * @return
     * @throws Exception
     */
    boolean updateCo(Co co) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteCo(Long id) throws Exception;

    /**
     * 根据ID获取查询对象
     *
     * @param id
     * @return
     * @throws Exception
     */
    CoQueryVo getCoById(Serializable id) throws Exception;


    List<Co> getAllList(LambdaQueryWrapper<Co> wrapper) throws Exception;

    /**
     * 获取分页对象
     *
     * @param coQueryParam
     * @return
     * @throws Exception
     */
    Paging<CoQueryVo> getCoPageList(CoPageParam coPageParam) throws Exception;


}
